function y = hank_m_from_arg(arg, m, order)

    gama = 0.5772;
    func_gamma_m = gamma(m);
    func_gamma_m_p_1 = gamma(m+1);
    J_m_from_arg = (1./func_gamma_m_p_1).*(arg./2).^m;
    
    if(order==1)
        sign = 1;
    elseif(order==2)
        sign = -1;
    else
        error 'Error: order of Hankel function is invalid';
    end
    
    if(m==0)
        N_m_from_arg = (2/pi)*(log(arg./2) + gama);
    else
        N_m_from_arg = -(func_gamma_m./pi).*(2./arg).^m;
    end
    
    if((arg==0))
        y = J_m_from_arg + sign*1i*N_m_from_arg;
    else
        y = besselh(m, order, arg);
    end
    
end